package com.monitor.util;

import java.text.Collator;
import java.util.Comparator;
import java.util.List;

@SuppressWarnings("unchecked")
public class SortingTpms implements Comparator  {
	Collator cmp = Collator.getInstance(java.util.Locale.CHINA);
	public int compare(Object value1, Object value2){
		List<String> val1 = (List<String>) value1;
		List<String> val2 = (List<String>) value2;
		if(cmp.compare(val1.get(4), val2.get(4))==0){
			if(cmp.compare(val1.get(6), val2.get(6))<0){
				return -1;
			}else{
				return 1;
			}
		}else if(cmp.compare(val1.get(4), val2.get(4))<0){
			return -1;
		}else{
			return 1;
		}
	}
}
